package com.isoft.illustrationsdraw.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.isoft.illustrationsdraw.entity.IllustrationCollection;
import com.isoft.illustrationsdraw.mapper.IllustrationCollectionMapper;
import com.isoft.illustrationsdraw.service.IllustrationCollectionService;

import java.util.List;

import org.springframework.stereotype.Service;

@Service
public class IllustrationCollectionServiceImpl extends ServiceImpl<IllustrationCollectionMapper, IllustrationCollection> implements IllustrationCollectionService {

    @Override
    public List<IllustrationCollection> getCollectionByIllustrationId(Long illustrationId) {
        LambdaQueryWrapper<IllustrationCollection> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(IllustrationCollection::getIllustrationsId, illustrationId);

        return this.list(lambdaQueryWrapper);
    }
}
